/* General Body Styling for Centering Content */
body {
    padding-top: 20px;
    background-color: #f8f9fa;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Page Title Styling */
.page-title {
    text-align: center;
    margin-bottom: 20px;
    color: #343a40;
}

/* Admin Page Specific Styles */
.admin-page-title {
    margin-bottom: 0;
}

.card-header .row {
    align-items: center;
}

.card-body .row.align-items-center {
    margin-bottom: 10px;
}

.card-body .row.align-items-center:last-child {
    margin-bottom: 0;
}

/* Adjust form control and button spacing in input groups */
.input-group .form-control {
    flex-grow: 1;
}

.input-group .btn {
    flex-shrink: 0;
}

/* Sensitive word list header alignment */
.sensitive-word-list-header .col-md-4, 
.sensitive-word-list-header .col-md-5, 
.sensitive-word-list-header .col-md-3 {
    display: flex;
    align-items: center;
}

.sensitive-word-list-header .col-md-3 {
    justify-content: flex-end;
}

#totalWordsCount {
    margin-right: 15px;
    font-weight: bold;
    color: #555;
}

/* Cache Settings */
.cache-settings-row .col-md-6:last-child {
    text-align: right;
}

.cache-settings-row .btn {
    margin-left: 10px;
}

.form-check-inline {
    margin-right: 15px;
}

/* Account Settings */
.account-settings-row .col-md-6 {
    margin-bottom: 15px;
}

.account-settings-row .col-12 {
    margin-top: 5px;
}

/* Table adjustments */
.table thead th {
    background-color: #f2f2f2;
    border-bottom: 2px solid #dee2e6;
}

.table td, .table th {
    vertical-align: middle;
}

/* Pagination adjustments */
.pagination .page-link {
    color: #007bff;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
}

/* Drop Zone Styling */
.drop-zone {
    border: 2px dashed #007bff;
    border-radius: 5px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background-color: #e9ecef;
    margin-bottom: 20px;
}

.drop-zone.dragover {
    background-color: #cce5ff;
    border-color: #0056b3;
}

.drop-zone-text {
    margin-bottom: 15px;
    color: #495057;
}

.file-input-button {
    margin-bottom: 15px;
}

.supported-formats {
    color: #6c757d;
    font-size: 0.9rem;
}

/* File List Styling */
.file-list {
    margin-top: 20px;
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 5px;
}

.file-item .file-name {
    flex-grow: 1;
    margin-right: 10px;
}

.file-item .remove-button {
    cursor: pointer;
    color: #dc3545;
    border: none;
    background: none;
}

/* Detection Button Styling */
.detect-button-container {
    text-align: center;
    margin-top: 20px;
}

.detect-button {
    /* Bootstrap button classes should handle most styling */
}

/* Result Area Styling */
.results-area {
    margin-top: 30px;
}

/* 敏感词高亮样式 */
.highlight {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* 检测结果标签样式 */
.result-label {
    display: inline-flex;
    align-items: center;
    min-width: 100px;
    height: 28px;
    margin-right: 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    padding: 0 8px;
}

.result-label.sensitive {
    background-color: #fff2f0;
    color: #dc3545;
    border: 1px solid #ffccc7;
    min-width: 150px;
}

.result-label.position {
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.result-label.context {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

/* 文件标题样式 */
.file-title {
    margin: 0;
    padding: 12px 1.25rem;
    background: linear-gradient(to right, #e3f2fd, #f8f9fa);
    border-bottom: 2px solid #90caf9;
    color: #1976d2;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.file-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background-color: #1976d2;
    margin-right: 8px;
    border-radius: 2px;
}

/* 敏感词检测结果项样式 */
.sensitive-word-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}

.sensitive-word-item:last-child {
    border-bottom: none;
}

.sensitive-word-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sensitive-word-row:last-child {
    margin-bottom: 0;
}

.sensitive-word-value {
    font-size: 15px;
    color: #333;
}

/* 上下文样式 */
.context-content {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
    word-break: break-all;
    margin-top: 5px;
    margin-left: 0;
    text-align: left;
}

/* 表格样式 */
.table th {
    background-color: #f8f9fa;
}

/* 按钮样式 */
.btn {
    margin: 0 2px;
}

/* 卡片样式 */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* 分页样式 */
.pagination {
    margin-top: 20px;
}

/* 搜索框样式 */
#searchInput {
    max-width: 300px;
    margin: 0 auto;
}

/* 加载动画样式 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
    }
    
    .card-header div {
        margin-top: 10px;
    }
    
    .btn {
        margin: 2px;
    }
    
    /* Adjust stacking on smaller screens */
    .sensitive-word-list-header .col-md-4, 
    .sensitive-word-list-header .col-md-5, 
    .sensitive-word-list-header .col-md-3 {
        display: block;
        width: 100%;
    }
    
    .sensitive-word-list-header .col-md-5 {
        margin-top: 10px;
    }
    
    .sensitive-word-list-header .col-md-3 {
        text-align: left;
        margin-top: 10px;
    }

    .sensitive-word-list-header .col-md-3 #totalWordsCount {
        margin-right: 0;
        margin-bottom: 10px;
        display: block;
    }
}

/* 登录页面样式 */
.login-page {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.login-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    height: 45px;
    border-radius: 4px;
}

.btn-login {
    width: 100%;
    height: 45px;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
}

.btn-login:hover {
    background-color: #0056b3;
}

.alert {
    margin-bottom: 20px;
}

/* 其他页面样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

.btn-group {
    margin-bottom: 20px;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
}

.pagination {
    margin-top: 20px;
    justify-content: center;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.form-label {
    font-weight: 500;
    margin-bottom: 5px;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card-header {
        padding: 10px 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 5px;
    }
    
    .table-responsive {
        margin-bottom: 15px;
    }
}

/* Custom Column Width for Main Content Area */
.custom-col-width {
    max-width: 80% !important;
    flex: 0 0 80% !important;
}

/* Table adjustments */
.table th {
    background-color: #f8f9fa;
} 